from usr.qframe import Application
from usr.business import net_service


def create_app(name='demo', version='1.0.0', config_path='/usr/default.json'):
    _app = Application(name, version=version)
    _app.settings.from_json(config_path)

    net_service.init_app(_app)

    return _app


if __name__ == '__main__':
    app = create_app()
    app.run()
